#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#define FIUSH_NOW 1
#define FIUSH_LINE 2
#define FIUSH_ALL 4
typedef unsigned char byte;
#define buf_size 120
struct _IO_FILE 
{
    int _fileno; 
    byte buffer[buf_size];
    int flush_style;
    int buf_pos;
};
typedef struct _IO_FILE FILE;

FILE * myfopen ( const char * filename, const char * mode );
size_t myfwrite ( const void * ptr, size_t size, size_t count, FILE * stream );
int myfclose ( FILE * stream );